#ifndef DECHEXBIN_H
#define DECHEXBIN_H 

#include <gtk/gtk.h> 
#include <stdlib.h>
#include <string.h>

#define ADD (0x1)
#define SUB (0x1<<1)
#define MUL (0x1<<2)
#define DIV (0x1<<3)


/*Toggle button*/
GtkWidget* but;

/*Frame 3*/
GtkWidget* f3;

/*Result window*/
GtkWidget* w2;

/*op frame*/
GtkWidget* op_f;

typedef struct _n_entry {
	long long int value;
	GtkWidget * dec_label;
	GtkWidget * dec_entry;
	GtkWidget * dec_right_label;
	GtkWidget * hex_label;
	GtkWidget * hex_le_entry;
	GtkWidget * hex_be_label;
	GtkWidget * hex_be_entry;
	GtkWidget * bin_label;
	GtkWidget * bin_le_entry;
	GtkWidget * bin_be_label;
	GtkWidget * bin_be_entry;
} n_entry;

n_entry* create_number1_entry(GtkWidget *);
n_entry* create_number2_entry(GtkWidget *);
n_entry* create_result_entry(GtkWidget *);

enum event_type {n1d,n1h,n2d,n2h};
typedef struct _event_data_t {
	n_entry * n1;
	n_entry * n2;
	n_entry * n3;
	enum event_type type;
} event_data_t;

#define EVENT_DATA(ed,et) {ed.n1 = n1; \
				ed.n2 = n2;\
				ed.n3 = n3;\
				ed.type = et;}

#endif
